package com.sixth.controller;

import com.sixth.service.OutLibraryService;
import com.sixth.util.CommonResult;
import com.sixth.util.LayTab;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: project01
 * @description:
 * @author: 老范
 * @create: 2021-12-17 21:11
 **/
@RestController
@RequestMapping("outLibrary")
public class OutLibraryController {
    @Autowired
    private OutLibraryService outLibraryService;


    //批量出库
    @RequestMapping("batch")
    public CommonResult batch(String batchGoods) {
        return outLibraryService.batch(batchGoods);
    }

    //平调出库
    @RequestMapping("transferOutLibrary")
    public CommonResult transferOutLibrary(String batchGoods,Integer branchid) {
        return outLibraryService.transferOutLibrary(batchGoods,branchid);
    }

    //零售出库
    @RequestMapping("retailOutLibrary")
    public CommonResult retailOutLibrary(Integer branchid, Integer goodsid, Integer count, Integer chuKuNum) {
        return outLibraryService.retailOutLibrary(branchid, goodsid, count, chuKuNum);
    }

    //出库详情
    @RequestMapping("outLibraryDetails")
    public LayTab outLibraryDetails(Integer cid) {
        return outLibraryService.outLibraryDetails(cid);
    }

    //平调出库详情
    @RequestMapping("outLibraryTransferDetails")
    public LayTab outLibraryTransferDetails(Integer cid) {
        return outLibraryService.outLibraryTransferDetails(cid);
    }
}
